package com.cykj.enterprise.mapper;

import com.cykj.common.entity.CompanyCheckDO;
import com.cykj.common.entity.HrDO;
import com.cykj.common.entity.OnlineResumeDO;
import com.cykj.common.entity.UserDO;
import com.cykj.enterprise.vo.CompanyInfoVO;
import com.cykj.enterprise.vo.HrVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface HrMapper {
    HrDO hrLogin(@Param("acc") String account,@Param("pwd") String password);

    int register(HrVO hrVO);

    HrDO getLoginInfo(@Param("hrId") int hrId);

    int updateInfo(HrDO hrDO);

    List<HrDO> getSubHrs(@Param("companyId")int companyId);

    int changeStatus(@Param("hrId")int hrId);

    int addSubHr(HrDO hrDO);

    int reviseImgName(@Param("hrId")Object hrId, @Param("imgName")String name);

    OnlineResumeDO getUserOnlineResume(@Param("userId")int userId);

    UserDO getUserInfo(@Param("userId") int userId,@Param("hrId") int hrId);

    /**
    * @Description: 判断hr是否绑定公司
    * @Param: []
    * @return: com.cykj.common.entity.HrDO
    */
    HrDO hrCompany(@Param("hrId") Integer hrId);

    /**
    * @Description: 判断hr是否已提交企业资质审核
    * @Param: [hrId]
    * @return: com.cykj.common.entity.CompanyCheckDO
    */
    CompanyCheckDO hrCompanyCheck(@Param("hrId")Integer hrId);

    /**
    * @Description: 存储企业资质信息
    * @Param: [companyInfoVO]
    * @return: java.lang.Integer
    */
    Integer submitCompanyData(@Param("companyInfoVO")CompanyInfoVO companyInfoVO);

    int countSubHr(HrDO hrDO);
}
